package com.xxgc.eow.mapper;

import com.xxgc.eow.entity.Comment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxgc.eow.entity.CommentSecondary;
import com.xxgc.eow.entity.Secondaycomment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 评论 Mapper 接口
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-22
 */
@Mapper
public interface CommentMapper extends BaseMapper<Comment> {
    List<Comment> selectArticleId(int article);

    int delComment (@Param("commentId") int commentId, @Param("time") LocalDateTime time);

    List<Secondaycomment> selectSecondComment(int commentId);

    CommentSecondary selectByCommentId(int commentId);

    List<Comment> selectArticleByUserId(int userId);

    List<CommentSecondary> selectAll();
}
